From: Andrew Cooper Date: Thu, 19 Nov 2015 14:45:41 +0000 (+0000) Subject: tools/libxc: Correct XC_DOM_PAGE_SIZE() to return a long long X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2238 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=aec38117171b1fef50d6c3cf42dbd176907c7e18;p=xen.git tools/libxc: Correct XC_DOM_PAGE_SIZE() to return a long long c/s abdf3c5b "libxc: create p2m list outside of kernel mapping if supported" introduces a use which Coverity objects to; an int used to mask a uint64_t. The result needs to be signed to allow ~XC_DOM_PAGE_SIZE() to function correctly, and long long to function properly in 32bit builds. Signed-off-by: Andrew Cooper Acked-by: Wei Liu --- diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h index 6f0c6e08f0..217621600a 100644 --- a/tools/libxc/include/xc_dom.h +++ b/tools/libxc/include/xc_dom.h @@ -249,7 +249,7 @@ struct xc_dom_arch { void xc_dom_register_arch_hooks(struct xc_dom_arch *hooks); #define XC_DOM_PAGE_SHIFT(dom) ((dom)->arch_hooks->page_shift) -#define XC_DOM_PAGE_SIZE(dom) (1 << (dom)->arch_hooks->page_shift) +#define XC_DOM_PAGE_SIZE(dom) (1LL << (dom)->arch_hooks->page_shift) /* --- main functions ---------------------------------------------- */